import "./styles/index.scss";

import button from "./components/button";
import { carousel, carouselItem } from "./components/carousel";
import input from "./components/input";
import modal from "./components/modal";
import numberAnimation from "./components/numberAnimation";
import popover from "./components/popover";
import scrollbar from "./components/scrollbar";
import { select, option } from "./components/select";
import _switch from "./components/switch";
import { tabs, tabPane } from "./components/tabs";
import { collapse, collapseItem } from "./components/collapse";
import toast from "./components/toast";

const components = [
  button, carousel, carouselItem, input,
  modal, numberAnimation, popover, scrollbar,
  select, option, _switch, tabs, tabPane, collapse,
  collapseItem
];

const install = function (Vue) {
  components.forEach(com => {
    Vue.component(com.name, com);
  });

  Vue.prototype.$toast = toast;
};

export default install;
